<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>

    let list = [
      {name:'张三',age:19},
      {name:'李四',age:17},
      {name:'王五',age:18},
      {name:'张麻子',age:18},
      {name:'小明',age:17},
    ]
    let result1 = list.every((item)=> {
      // 错误写法
      // if(item.age === 18){
      //   return
      // }

      // 括号内的结果要return
      return item.age === 18
    })


    let result2 = list.some(item => {
      return item.age === 18
    })


    let result3 = list.some(item => item.age === 18)

    console.log(result1,result2,result3);
  </script>
</body>
</html>